/*
 * Copyright (c) 2008-2012
 * LANIT
 * All rights reserved.
 *
 * This product and related documentation are protected by copyright and
 * distributed under licenses restricting its use, copying, distribution, and
 * decompilation. No part of this product or related documentation may be
 * reproduced in any form by any means without prior written authorization of
 * LANIT and its licensors, if any.
 *
 * $Id$
 */
package ru.lanit.bpm.ipa.timesheet.model;

import java.sql.Blob;

public class Employee {
    // PEGASystem Fields
    private String pxInsName; // ID
    private String pxObjClass; // ClassName
    private String pyLabel; // ID
    private String pzInsKey; // Class + _ + ID

    private Blob pzPvStream; // (BLOB)

    // Semantic fields
    private Long id;
    private String name;
    private String email;
    private String pyUserIdentifier;
    private String lastName;
    private String firstName;
    private String middleName;

    public Employee() {
    }

    public Employee(Long id, String name, String email, String pyUserIdentifier, String lastName, String firstName, String middleName) {

        this.id = id;
        this.name = name;
        this.email = email;
        this.pyUserIdentifier = pyUserIdentifier;
        this.lastName = lastName;
        this.firstName = firstName;
        this.middleName = middleName;
    }

    public Employee(String pxInsName, String pxObjClass, String pyLabel, String pzInsKey, Blob pzPvStream, Long id, String name, String email,
            String pyUserIdentifier, String lastName, String firstName, String middleName) {
        this.pxInsName = pxInsName;
        this.pxObjClass = pxObjClass;
        this.pyLabel = pyLabel;
        this.pzInsKey = pzInsKey;
        this.pzPvStream = pzPvStream;
        this.id = id;
        this.name = name;
        this.email = email;
        this.pyUserIdentifier = pyUserIdentifier;
        this.lastName = lastName;
        this.firstName = firstName;
        this.middleName = middleName;
    }

    public String getPxInsName() {
        return pxInsName;
    }

    public void setPxInsName(String pxInsName) {
        this.pxInsName = pxInsName;
    }

    public String getPxObjClass() {
        return pxObjClass;
    }

    public void setPxObjClass(String pxObjClass) {
        this.pxObjClass = pxObjClass;
    }

    public String getPyLabel() {
        return pyLabel;
    }

    public void setPyLabel(String pyLabel) {
        this.pyLabel = pyLabel;
    }

    public String getPzInsKey() {
        return pzInsKey;
    }

    public void setPzInsKey(String pzInsKey) {
        this.pzInsKey = pzInsKey;
    }

    public Blob getPzPvStream() {
        return pzPvStream;
    }

    public void setPzPvStream(Blob pzPvStream) {
        this.pzPvStream = pzPvStream;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPyUserIdentifier() {
        return pyUserIdentifier;
    }

    public void setPyUserIdentifier(String pyUserIdentifier) {
        this.pyUserIdentifier = pyUserIdentifier;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getMiddleName() {
        return middleName;
    }

    public void setMiddleName(String middleName) {
        this.middleName = middleName;
    }

/*    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        Employee employee = (Employee) o;

        if (!email.equals(employee.email)) {
            return false;
        }
        if (!firstName.equals(employee.firstName)) {
            return false;
        }

        if (id != null ? !id.equals(employee.id) : employee.id != null) {
            return false;
        }
        if (!lastName.equals(employee.lastName)) {
            return false;
        }
        if (!middleName.equals(employee.middleName)) {
            return false;
        }
        if (!name.equals(employee.name)) {
            return false;
        }
        if (!pxInsName.equals(employee.pxInsName)) {
            return false;
        }
        if (!pxObjClass.equals(employee.pxObjClass)) {
            return false;
        }
        if (!pyLabel.equals(employee.pyLabel)) {
            return false;
        }
        if (!pyUserIdentifier.equals(employee.pyUserIdentifier)) {
            return false;
        }
        if (!pzInsKey.equals(employee.pzInsKey)) {
            return false;
        }
        if (!pzPvStream.equals(employee.pzPvStream)) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        int result = pxInsName.hashCode();
        result = 31 * result + pxObjClass.hashCode();
        result = 31 * result + pyLabel.hashCode();
        result = 31 * result + pzInsKey.hashCode();
        result = 31 * result + pzPvStream.hashCode();
        result = 31 * result + (id != null ? id.hashCode() : 0);
        result = 31 * result + name.hashCode();

        result = 31 * result + email.hashCode();
        result = 31 * result + pyUserIdentifier.hashCode();
        result = 31 * result + lastName.hashCode();
        result = 31 * result + firstName.hashCode();
        result = 31 * result + middleName.hashCode();
        return result;
    }

    @Override
    public String toString() {
        return ReflectionToStringBuilder.toString(this);
    }*/
}
